package com.zsr.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author zsr
 * @Desc
 * @Date 2021/5/23 11:19
 */
@Controller
public class RouterController {

    @RequestMapping({"/","index"})
    public String index(){
        return "index";
    }

    @RequestMapping("toLogin")
    public String toLogin(){
        return "views/login";
    }

    @RequestMapping("/level{index}/{id}")
    public String level(@PathVariable("index")int index,@PathVariable("id")int id){
        System.out.println(index);
        return "views/level"+index+"/"+id;
    }
}
